package cn.stylefeng.guns.modular.launchpad.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.List;


@Data
@TableName("launchpad_product")
@Accessors(chain = true)
public class Product implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("name")
    @ApiModelProperty(value = "分红币种名称(下拉框选择)")
    private String name;

    @TableField("pledge_coins")
    @ApiModelProperty(value = "质押币种集合,逗号分隔")
    private String pledgeCoins;

    @TableField("total_reward")
    @ApiModelProperty(value = "每次分红总金额")
    private String totalReward;

    @TableField("cycle_day")
    @ApiModelProperty(value = "挖矿周期(天)")
    private Integer cycleDay;

    @TableField("start_time")
    @ApiModelProperty(value = "开始时间")
    private Date startTime;

    @TableField("end_time")
    @ApiModelProperty(value = "结束时间(由后端计算)", hidden = true)
    private Date endTime;

    @TableField("interval_time")
    @ApiModelProperty(value = "分红间隔时间(分钟)")
    private Integer intervalTime;

    @TableField("logo_url")
    @ApiModelProperty(value = "logo")
    private String logoUrl;

    @TableField("summary")
    @ApiModelProperty(value = "项目摘要")
    private String summary;

    @TableField("enable_flag")
    @ApiModelProperty(value = "启用标识 0-禁用 1-启用", hidden = true)
    private Integer enableFlag;

    @TableField("create_time")
    @ApiModelProperty(value = "创建时间", hidden = true)
    private Date createTime;

    @TableField("update_time")
    @ApiModelProperty(value = "修改时间", hidden = true)
    private Date updateTime;

    @TableField("product_links")
    @ApiModelProperty(value = "产品链接配置[{name,content}]", hidden = true)
    private String productLinks;

    // 排序
    @TableField("sort_num")
    @ApiModelProperty(value = "排序")
    private Integer sortNum;

    // 是否热门 0-否 1-是
    @TableField("is_hot")
    @ApiModelProperty(value = "是否热门")
    private Integer isHot;


    // ------------------- 以下是非数据库字段 -------------------

    // 总参与人数
    @TableField(exist = false)
    private Integer participantNum;

    // 总投入总量
    @TableField(exist = false)
    private String totalInvestmentPrice;

    // 分发币种等价于多少BNB
    @TableField(exist = false)
    private String equivalenceBnbPrice;


    // 发行数量
    @TableField(exist = false)
    private String totalDistribution;

    // 奖池统计
    @TableField(exist = false)
    private List<Pledge> poolList;

    // 是否结束
    @TableField(exist = false)
    private Integer isEnd;

}
